(function(){
  var table = document.getElementById("record")
  var record = localStorage.getItem("record")
  record = record ? JSON.parse(record) : []
  var tbody = document.createElement("tbody");
  for (var item in record) {
    tbody.innerHTML +=
    "<tr>" +
      "<td>" + record[item].id + "</td>" +
      "<td>" + record[item].name + "</td>" +
      "<td>" + record[item].date + "</td>" +
      "<td>" + record[item].time + "</td>" +
    "</tr>"
  }
  table.appendChild(tbody);
})();
